import request from '../utils/request'

//登录接口
export const userLoginService = ({ name, password, code, key, jzmm }) =>
  request.post('/user/login?key=' + key, { name, password, code, jzmm })

//根据id获取用户信息
export const getUserInfoService = (id) => request.get('/user/' + id)

//新增用户
export const addUserService = (data) => request.post('/user/register', data)

//修改余额
export const updateBalanceService = (id, money) => request.put(`/user/${id}/pay?money=${money}`)

//更新用户信息
export const updateUserInfoService = (data) => request.post('/user', data)

//修改密码
export const updatePasswordService = (data) => request.put('/user/password', data)

//记住密码
export const rememberPasswordService = (data) => request.post('/user/updatejzmm', data)
